package com.ethan.orika;

import com.google.common.collect.Lists;
import lombok.*;
import ma.glasnost.orika.MapperFactory;
import ma.glasnost.orika.impl.DefaultMapperFactory;

import java.util.Date;
import java.util.List;

/**
 * @author ethan
 * create 2018-04-08 下午8:50
 * desc
 **/
public class OrikaTest {

    public static void main(String[] args){
        /**
         * 映射字段名完全相同的对象
//         **/
//        MapperFactory mapperFactory = new DefaultMapperFactory.Builder().build();
//        Person person = new Person("zs",20,new Date(), Lists.newArrayList(new Address("北京市海淀区东升科技园")));
//        PersonDto personDto = mapperFactory.getMapperFacade().map(person,PersonDto.class);
//        String a ="";





    }
}
//
//@Getter
//@Setter
//@Builder
//@NoArgsConstructor
//@AllArgsConstructor
//class Person{
//    private String name;
//    private int age;
//    private Date birthDate;
//    private List<Address> addressList;
//}
//
//@Getter
//@Setter
//@Builder
//@NoArgsConstructor
//@AllArgsConstructor
//class Address{
//    private String name;
//}
//
//@Getter
//@Setter
//@Builder
//@NoArgsConstructor
//@AllArgsConstructor
//class PersonDto{
//    private String name;
//    private int age;
//    private Date birthDate;
//    private List<AddressDto> addressList;
//}
//
//@Getter
//@Setter
//@Builder
//@NoArgsConstructor
//@AllArgsConstructor
//class AddressDto{
//    private String name;
//}

